PROJECT(mandelbrot-julia)
ENABLE_TESTING( )
SET( SRCS
     main.cpp
     complex.cpp
     renderarea.cpp
     renderthread.cpp
     mandelbrotwindow.cpp
     mandelbrotthread.cpp
     juliawindow.cpp
     juliathread.cpp
)

SET( MOC_HDRS
     renderarea.h
     renderthread.h
     mandelbrotwindow.h
     mandelbrotthread.h
     juliawindow.h
     juliathread.h
)

ADD_DEFINITIONS( -Wall -g )
SET(CMAKE_EXE_LINKER_FLAGS -mwindows)
SET( QT_USE_QTXML TRUE )
FIND_PACKAGE( Qt4 REQUIRED )
INCLUDE( ${QT_USE_FILE} )
QT4_WRAP_CPP( MOC_SRCS ${MOC_HDRS} )
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS} ${MOC_SRCS} )
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} )
ADD_TEST( test ${EXECUTABLE_OUTPUT_PATH}/${PROJECT_NAME} )
